#region Using directives
using System;
using System.Collections.Generic;
using System.Text;
using webapp4U.DAL;
#endregion


namespace webapp4U.BOL
{
	 public class NewsLetter : BizObject
	 {
	     #region Member Variables

	     private Int32 _newsLetterID;

	     private String _userID;

	     private DateTime _addedDate;

	     private String _title;

	     private String _firstName;

	     private String _lastName;

	     private String _email;

	     private String _company;

	     #endregion



	     #region Public Properties

	     public Int32 NewsLetterID
	     {
		     get { return _newsLetterID; }
		     set { _newsLetterID = value; }
	     }

	     public String UserID
	     {
		     get { return _userID; }
		     set { _userID = value; }
	     }

	     public DateTime AddedDate
	     {
		     get { return _addedDate; }
		     set { _addedDate = value; }
	     }

	     public String Title
	     {
		     get { return _title; }
		     set { _title = value; }
	     }

	     public String FirstName
	     {
		     get { return _firstName; }
		     set { _firstName = value; }
	     }

	     public String LastName
	     {
		     get { return _lastName; }
		     set { _lastName = value; }
	     }

	     public String Email
	     {
		     get { return _email; }
		     set { _email = value; }
	     }

	     public String Company
	     {
		     get { return _company; }
		     set { _company = value; }
	     }

	     #endregion

	     #region public static Methods

         public static Boolean DeleteByEmail(String Email)
         {
             NewsLetterDAL db = new NewsLetterDAL();
             return db.DeleteByEmail(Email);
         }

         public static Boolean CheckEmail(String Email)
         {
             NewsLetterDAL db = new NewsLetterDAL();
             return db.CheckEmail(Email);
         }

	     public static int Insert(NewsLetter obj)
	     {
		     NewsLetterDAL db = new NewsLetterDAL();
		     return db.Insert(obj);
	     }

	     public static bool Update(NewsLetter obj)
	     {
		     NewsLetterDAL db = new NewsLetterDAL();
		     return db.Update(obj);
	     }

	     public static bool Delete(Int32 NewsLetterID)
	     {
		     NewsLetterDAL db = new NewsLetterDAL();
		     return db.Delete(NewsLetterID); 
	     }

	     public static NewsLetter GetNewsLetterByID(Int32 NewsLetterID)
	     {
		     NewsLetterDAL db = new NewsLetterDAL();
		     return db.GetNewsLetterByID(NewsLetterID);
	     }

         //Get All NewsLetter
         public static List<NewsLetter> GetAllNewsLetter()
         {
             NewsLetterDAL db = new NewsLetterDAL();
             return db.GetAllNewsLetter(1, MAXROWS);
         }


	     //Get All NewsLetter
	     public static List<NewsLetter> GetAllNewsLetter(int PageIndex, int PageSize)
	     {
		     NewsLetterDAL db = new NewsLetterDAL();
		     return db.GetAllNewsLetter(PageIndex, PageSize);
	     }

	     // Get Count All records of Table  NewsLetter
	     public static int GetCountNewsLetter()
	     {
		     NewsLetterDAL db = new NewsLetterDAL();
		     return db.GetCountNewsLetter();
	     }



	     #endregion
	 }
}
